package com.linkage.jz.bankruptcy.bean.Vote;

import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Auth implements Serializable {

    private String viewVotingSchedule;
    private String viewVotingDetails;
    private String joinMeeting;
    private String quitMeeting;
    private String meetingVote;
    private String doVote;
    public String getMyVote() {
        return myVote;
    }

    public void setMyVote(String myVote) {
        this.myVote = myVote;
    }

    private String myVote;
    public String isViewVotingSchedule() {
        return viewVotingSchedule;
    }

    public void setViewVotingSchedule(String viewVotingSchedule) {
        this.viewVotingSchedule = viewVotingSchedule;
    }

    public String isViewVotingDetails() {
        return viewVotingDetails;
    }

    public void setViewVotingDetails(String viewVotingDetails) {
        this.viewVotingDetails = viewVotingDetails;
    }

    public String getJoinMeeting() {
        return joinMeeting;
    }

    public void setJoinMeeting(String joinMeeting) {
        this.joinMeeting = joinMeeting;
    }

    public String getQuitMeeting() {
        return quitMeeting;
    }

    public void setQuitMeeting(String quitMeeting) {
        this.quitMeeting = quitMeeting;
    }

    public String getMeetingVote() {
        return meetingVote;
    }

    public void setMeetingVote(String meetingVote) {
        this.meetingVote = meetingVote;
    }

    public String getDoVote() {
        return doVote;
    }

    public void setDoVote(String doVote) {
        this.doVote = doVote;
    }

    public static List<Auth> parse(JsonArray arr) {
        List<Auth> list = new ArrayList<>();
        for (int i = 0; i < arr.size(); i++) {
            list.add(parse(arr.get(i).getAsJsonObject()));
        }
        return list;
    }

    public static Auth parse(JsonObject obj) {
        Auth bean = new Gson().fromJson(obj, Auth.class);
        return bean;
    }
}
